package com.danciyixue.boot.client.testAnswer.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.danciyixue.boot.common.result.PageResult;
import com.danciyixue.boot.dcyx.model.query.TestAnswersQuery;
import com.danciyixue.boot.dcyx.model.vo.TestAnswersVO;
import com.danciyixue.boot.dcyx.service.TestAnswersService;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 客户端测试答案控制器
 */
@Tag(name = "19. 测试答案", description = "测试答案")
@RestController
@RequestMapping("/api/client/v1/test-answer")
@RequiredArgsConstructor
public class DcyxTestAnswerController {

    private final TestAnswersService testAnswersService;

    /**
     * 获取测试答案数据
     */
    @GetMapping("/page")
    public PageResult<TestAnswersVO> page(TestAnswersQuery queryParams) {
        IPage<TestAnswersVO> page = testAnswersService.getTestAnswersPage(queryParams);
        return PageResult.success(page);
    }
} 